package com.br.extreme.StockService.dao;

import java.io.Serializable;
import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;


public abstract class GenericDAO<T, K extends Serializable>{

	private EntityManagerFactory factory = Persistence.createEntityManagerFactory("stock");
	
	protected EntityManager entityManager = factory.createEntityManager();
	
	public abstract T find(K id);
	
	public abstract List<T> list(String query);
	
	public abstract List<T> listAll();
	
	
}
